﻿@inherits UmbracoTemplatePage
@{
    Layout = "Base.cshtml";
    Markdown md = new Markdown();
    var searchLink = Model.Content.GetPropertyValue<IPublishedContent>("searchLink");
}

<div class="index-search">
    <div class="input-group input-group-lg col-md-8 col-md-offset-2">
        <input type="text" class="form-control input-lg" id="txtGlobalSearch" maxlength="20" placeholder="@Model.Content.GetPropertyValue("searchBoxTips")" data-search-url="@searchLink.Url">
        <span class="input-group-btn">
            <button class="btn btn-default" id="btnGlobalSearch" type="button" data-search-url="@searchLink.Url">搜索</button>
        </span>
    </div>
</div>
<div class="index-news">
    @MvcHtmlString.Create(md.Transform(Model.Content.GetPropertyValue<string>("newsletter")))
</div>

<div class="container" style="padding: 150px 0;">
    @if (Model.Content.HasValue("mainText") && Model.Content.HasValue("mainTextImage"))
    {
        var image = Umbraco.Media(Model.Content.GetPropertyValue<int>("mainTextImage"));
        <img src="@image.umbracoFile.src" alt="@Model.Content.GetPropertyValue("mainText")" class="img-responsive center-block" />
    }
    
</div>